//package cn.net.shuxing.yifu.common.quartz.job;
//
//import cn.net.shuxing.yifu.common.bean.*;
//import cn.net.shuxing.yifu.common.constant.*;
//import cn.net.shuxing.yifu.common.dto.BaseDto;
//import cn.net.shuxing.yifu.common.front.controller.DealController;
//import cn.net.shuxing.yifu.common.service.*;
//import cn.net.shuxing.yifu.common.util.JedisUtil;
//import cn.net.shuxing.yifu.common.util.LocalDateTimeUtil;
//import cn.net.shuxing.yifu.common.util.RedisKeyCreator;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.InitializingBean;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//import cn.net.shuxing.yifu.common.util.StringUtils;
//
//import java.time.LocalDate;
//import java.time.LocalDateTime;
//import java.util.*;
//
///**
// * 构建执行定时任务
// */
//@Component
//@Slf4j
//public class ScheduledTask implements InitializingBean {
//
//    private int fixedDelayCount = 1;
//    private int fixedRateCount = 1;
//    private int initialDelayCount = 1;
//    private int cronCount = 1;
//    private int index = 7000;
//    private int deleteIndex = 0;
//
//    @Autowired
//    private KLineDataService kLineDataService;
//
//    @Autowired
//    private DealHistoryService dealHistoryService;
//
//    @Autowired
//    private JedisUtil jedisUtil;
//
//    @Autowired
//    private CoinTypeService coinTypeService;
//
//    @Autowired
//    private UserService userService;
//
//    @Autowired
//    private UserRoleService userRoleService;
//
//    @Autowired
//    private DealParamService dealParamService;
//
//    @Autowired
//    private UserWalletFrozeService userWalletFrozeService;
//
//    @Autowired
//    private AliveCoinActivateHistoryService aliveCoinActivateHistoryService;
//
//    @Autowired
//    private UserCommonService userCommonService;
//
//    @Autowired
//    ShareholderCommonService shareholderCommonService;
//
//    @Autowired
//    ShareholderCoinGrantHistoryService shareholderCoinGrantHistoryService;
//
//    @Autowired
//    DealMatchService dealMatchService;
//
//    @Autowired
//    DealController dealController;
//
//    @Autowired
//    OssCommonService ossCommonService;
//
//    @Autowired
//    MemberLevelService memberLevelService;
//
//    @Autowired
//    DealParamKeyService dealParamKeyService;
//
//    @Autowired
//    UserRealInfoService userRealInfoService;
//
//    @Autowired
//    ContentAdService contentAdService;
//
////    public void init() throws IOException {
////        //Jedis //jedis = jedisUtil.getJedis();
////        String s = jedisUtil.get(RedisKeyCreator.currentMarkImageIndex());
////        bufferedImage = ImageIO.read(ossCommonService.getUrlObj("yifuoss","originImage.png"));
////        //jedisUtil.close();
////
////    }
//
//
////    @Scheduled(fixedDelay = 5000)        //fixedDelay = 5000表示当前方法执行完毕5000ms后，Spring scheduling会再次调用该方法
////    public void testFixDelay() {
////        System.out.println("===fixedDelay: 第" + fixedDelayCount++ + "次执行方法");
////    }
////
////    @Scheduled(fixedRate = 5000)        //fixedRate = 5000表示当前方法开始执行5000ms后，Spring scheduling会再次调用该方法
////    public void testFixedRate() {
////        System.out.println("===fixedRate: 第" + fixedRateCount++ + "次执行方法");
////    }
////
////    @Scheduled(initialDelay = 1000, fixedRate = 5000)   //initialDelay = 1000表示延迟1000ms执行第一次任务
////    public void testInitialDelay() {
////        System.out.println("===initialDelay: 第" + initialDelayCount++ + "次执行方法");
////    }
////
////    @Scheduled(cron = "0 0/1 * * * ?")  //cron接受cron表达式，根据cron表达式确定定时规则
////    public void testCron() {
////        System.out.println("===initialDelay: 第" + cronCount++ + "次执行方法");
////    }
//
////    @Scheduled(fixedRate = 2000)
////    public void dealManualBuyAndSale() {
////        dealHistoryService.doBuyHangSale();
////        dealHistoryService.doSaleHangBuy();
////    }
//
//    /**
//     * 计算会员等级
//     */
//    @Scheduled(fixedRate = 1000 * 60 * 2)
//    public void calculateMemberLevelCount() {
//        memberLevelService.calculateMemberLevelCount();
//    }
//
//
//    /**
//     * 配发货币
//     **/
////    @Scheduled(fixedRate = 3600000)
////    @Scheduled(fixedRate = 60000)
//    @Scheduled(fixedRate = 1000*10)
//    public void coinGrant() {
//        LocalDateTime now = LocalDateTime.now();
//        //Jedis //jedis = jedisUtil.getJedis();
//
//        List<CoinType> coinTypeList = coinTypeService.getAllWithoutComplete();
//        for (CoinType coinType : coinTypeList) {
//            Integer coinTypeId = coinType.getId();
//            String intervalTimeStr = jedisUtil.get(RedisKeyCreator.grantIntervalTime(coinTypeId));
//            if (!StringUtils.hasText(intervalTimeStr)) {
//                continue;
//            }
//            long intervalTime = Long.valueOf(intervalTimeStr);
//
//            String startGrantTimeStr = jedisUtil.get(RedisKeyCreator.startGrantTime(coinTypeId));
//            LocalDateTime startGrantTime = null;
//            if (StringUtils.hasText(startGrantTimeStr))
//                startGrantTime = LocalDateTime.parse(startGrantTimeStr);
//            else
//                continue;
//            List<ShareholderCoinGrantHistory> shareholderCoinGrantHistoryList = shareholderCoinGrantHistoryService.getsByCoinTypeIdAndType(coinTypeId, Type.ALIVECOIN);
//            LocalDateTime lastGrantTime = null;
//            if (shareholderCoinGrantHistoryList != null && !shareholderCoinGrantHistoryList.isEmpty()) {
//                shareholderCoinGrantHistoryList.sort((ShareholderCoinGrantHistory x, ShareholderCoinGrantHistory y) -> {
//                    return x.getId().compareTo(y.getId());
//                });
//                ShareholderCoinGrantHistory shareholderCoinGrantHistory = shareholderCoinGrantHistoryList.get(shareholderCoinGrantHistoryList.size() - 1);
//                lastGrantTime = shareholderCoinGrantHistory.getCreateTime();
//            } else {
//                lastGrantTime = startGrantTime;
//            }
//
////            lastGrantTime = lastGrantTime.plusMinutes(intervalTime);
////            lastGrantTime = lastGrantTime.plusSeconds(intervalTime);
//            lastGrantTime = lastGrantTime.plusHours(intervalTime);
//            if (now.isAfter(lastGrantTime)) {
//                System.out.println(LocalDateTime.now().toString() + "----> 开始配币");
//                shareholderCommonService.grantCoin(coinTypeId);
//            }
//        }
//    }
//
//    /**
//     * 激活用户
//     **/
//    @Scheduled(fixedRate = 2 * 60000)
//    public void activateUser() {
//        List<UserRole> userRoles = userRoleService.searchByState(UserState.ACTIVATING);
//        Set<Integer> ids = new HashSet<>();
//        userRoles.forEach((x) -> {
//            ids.add(x.getUserId());
//        });
//        List<User> userList = userService.searchByState(UserState.ACTIVATING);
//        userList.forEach((x) -> {
//            ids.add(x.getId());
//        });
//        for (Integer userId : ids) {
//            AliveCoinActivateHistory aliveCoinActivateHistory = aliveCoinActivateHistoryService.getByMemberId(userId);
//            LocalDateTime createTime = aliveCoinActivateHistory.getCreateTime();
//            LocalDateTime activateTime = createTime.plusMinutes(aliveCoinActivateHistory.getActivateTime());
//            LocalDateTime now = LocalDateTime.now();
//            if (now.isAfter(activateTime)) {
//                userService.activateUser(userId);
//                aliveCoinActivateHistoryService.update(aliveCoinActivateHistoryService.getByMemberId(userId));
//            }
//        }
//    }
//
//    /**
//     * 考核所有用户是否冻结
//     */
//    @Scheduled(fixedRate = 12 * 3600 * 1000)
//    public void exam() {
//        /**
//         * 考核用户:
//         * 1. 获取用户激活时间或者最后一次解封时间
//         * 2. 获取考核周期
//         * 3. 比对今日和考核期
//         */
//        List<UserCapital> userCapitals = userService.searchByStateInUserCapital(UserState.OK);
//        List<CoinType> coinTypeList = coinTypeService.getAll();
//        LocalDate now = LocalDate.now();
//        for (UserCapital userCapital : userCapitals) {
//            for (CoinType coinType : coinTypeList) {
//                Integer coinTypeId = coinType.getId();
//                /** 考核周期，单位: 天 **/
//                Integer examinationCycle = null;
//                int userId = userCapital.getUserId();
//                if (userService.hasRole(userId, UserType.MEMBER)) {
//                    examinationCycle = Integer.valueOf(dealParamService.getValue(userId, coinTypeId, UserParamConst.MEMBER_EXAMINATION_CYCLE));
//                    if (examinationCycle == null)
//                        return;
//                    UserRole userRole = userRoleService.getByUserIdAndUserRole(userId, UserType.MEMBER);
//                    LocalDateTime lastExamTime = userRole.getLastExamTime();
//                    if (lastExamTime == null) {
//                        userRole.setLastExamTime(userRole.getUpdateTime());
//                        userRoleService.update(userRole);
//                        lastExamTime = userRole.getLastExamTime();
//                    }
//
//                    LocalDate date = LocalDateTimeUtil.getLocalDate(lastExamTime);
//                    date = date.plusDays(examinationCycle);
//
//                    if (date.isBefore(now) && date.plusDays(examinationCycle).isAfter(now)) {
//                        break;
//                    } else if (date.isEqual(now)) {
//                        System.out.println("考核开始: 考核用户id:" + userId + ",考核周期为:" + examinationCycle + ",最近一次考核时间为:" + lastExamTime.toString() + ",现在是:" + now.toString());
//                        userWalletFrozeService.exam(userCapital.getUserId(), coinTypeId, UserType.MEMBER);
//                        break;
//                    }
//                }
//                if (userService.hasRole(userId, UserType.SHAREHOLDER)) {
//                    examinationCycle = Integer.valueOf(dealParamService.getValue(userId, coinTypeId, UserParamConst.SHAREHOLDER_EXAMINATION_CYCLE));
//                    if (examinationCycle == null)
//                        return;
//                    LocalDateTime lastExamTime = userRoleService.getByUserIdAndUserRole(userId, UserType.SHAREHOLDER).getLastExamTime();
//
//                    if (lastExamTime == null)
//                        continue;
//                    LocalDate date = LocalDateTimeUtil.getLocalDate(lastExamTime);
//                    date = date.plusDays(examinationCycle);
//
//                    if (date.isBefore(now) && date.plusDays(examinationCycle).isAfter(now)) {
//                        break;
//                    } else if (date.isEqual(now)) {
//                        System.out.println("考核开始: 考核用户id:" + userId + ",考核周期为:" + examinationCycle + ",最近一次考核时间为:" + lastExamTime.toString() + ",现在是:" + now.toString());
//                        userWalletFrozeService.exam(userCapital.getUserId(), coinTypeId, UserType.SHAREHOLDER);
//                        break;
//                    }
//                }
//
//            }
//        }
//
//        List<UserRole> userRoles = userRoleService.searchByState(UserState.FROZEN);
//        for (UserRole userRole : userRoles) {
//            Integer userId = userRole.getUserId();
//            List<UserWalletFroze> userWalletFrozes = userWalletFrozeService.getsByUserId(userId);
//            if (userWalletFrozes == null || userWalletFrozes.isEmpty())
//                continue;
//            userWalletFrozes.sort((x, y) -> {
//                return x.getId().compareTo(y.getId());
//            });
//            LocalDateTime createTime = userWalletFrozes.get(userWalletFrozes.size() - 1).getCreateTime();
//            int maxAllowFrozeTime = 0;
//            if (userRole.getRoleId() == UserType.MEMBER)
//                maxAllowFrozeTime = Integer.valueOf(dealParamService.getValue(userId, 1, UserParamConst.MEMBER_MAX_ALLOW_FROZEN_TIME));
//            if (userRole.getRoleId() == UserType.SHAREHOLDER)
//                maxAllowFrozeTime = Integer.valueOf(dealParamService.getValue(userId, 1, UserParamConst.SHAREHOLDER_MAX_ALLOW_FROZEN_TIME));
//
//            if (createTime.plusDays(maxAllowFrozeTime).isBefore(LocalDateTime.now())) {
//                userCommonService.delete(userId, userRole.getRoleId());
//            }
//
//
//        }
//    }
//
//    /** 初始化拼图验证的图片 **/
////    @Scheduled(fixedRate = 10)
////    public void generateMarkImage() throws IOException {
////
////        Random random = new Random();
////        int width = 55;
////        int height = 54;
////        BufferedImage bufferedImage = org.apache.commons.lang3.ObjectUtils.clone(this.bufferedImage);
////        int bufferedImageWidth = bufferedImage.getWidth();
////        int x = Math.abs(random.nextInt()%((bufferedImageWidth - width - 200))) + 200;
////        if (x < 0)
////            System.out.println("bufferedImage.width-->"+bufferedImage.getWidth());
////        int y = 67;
////        try {
////            BufferedImage markImage = MarkImageUtil.getMarkImage(bufferedImage, x, y, width,height);
////            int[][] cutAreaData = MarkImageUtil.getCutAreaData(bufferedImage.getWidth(), bufferedImage.getHeight(), x, y, width,height);
////            MarkImageUtil.cutByTemplate(bufferedImage,cutAreaData);
////            /** 背景图片 **/
////            String backgroundImage = MarkImageUtil.imageToBase64(bufferedImage);
////            byte[] backgroundImageBytes = Base64Utils.decode(backgroundImage.getBytes());
////            /** 滑块图片 **/
////            String sliderImage = MarkImageUtil.imageToBase64(markImage);
////            byte[] sliderImageBytes = Base64Utils.decode(sliderImage.getBytes());
////            index++;
////            //Jedis //jedis = jedisUtil.getJedis();
////            Map<String,String> resultMap = new HashMap<>();
////            ossCommonService.uploadFile("yifuoss","originImage" + index + "originImage.png",backgroundImageBytes,".png" );
////            ossCommonService.uploadFile("yifuoss","sliderImage" + index + "sliderImage.png",sliderImageBytes,".png" );
////            jedisUtil.setex(RedisKeyCreator.sliderImagePosition(index),3 * 60, String.valueOf(x));
////            jedisUtil.set(RedisKeyCreator.currentMarkImageIndex(),String.valueOf(index));
////            String originImageUrl = ossCommonService.getUrl("yifuoss", "originImage" + index + "originImage.png");
////            String sliderImageUrl = ossCommonService.getUrl("yifuoss", "sliderImage" + index + "sliderImage.png");
////            jedisUtil.set(RedisKeyCreator.originImageUrl(index),  originImageUrl);
////            jedisUtil.set(RedisKeyCreator.sliderImageUrl(index),  sliderImageUrl);
////            jedisUtil.set(RedisKeyCreator.sliderImagePosition(index),String.valueOf(x));
////            //jedisUtil.close();
////
////        } catch (IOException e) {
////            e.printStackTrace();
////        } catch (Exception e) {
////            e.printStackTrace();
////        }
////    }
////
////    @Scheduled(initialDelay = 3 * 60 * 1000,fixedRate = 60000)
////    public void deleteMarkImage()
////    {
////        ossCommonService.deleteFile("yifuiss","originImage" + deleteIndex + "originImage.png");
////        ossCommonService.deleteFile("yifuiss","originImage" + deleteIndex + "sliderImage.png");
////    }
//
//    /** 处理坐空 **/
//    /**
//     * 处理坐空
//     **/
//    @Scheduled(fixedRate = 1000 * 3600)
//    public void dealShort() {
//        //Jedis //jedis = jedisUtil.getJedis();
//        List<String> shortCountspecialUserList = jedisUtil.lrange(RedisKeyCreator.shortCountSpecialUserList(), 0, -1);
//        if (shortCountspecialUserList == null || shortCountspecialUserList.isEmpty())
//            return;
//        for (String userIdStr : shortCountspecialUserList) {
//            int userId = Integer.valueOf(userIdStr);
//            Integer coinTypeId = aliveCoinActivateHistoryService.getByMemberId(userId).getCoinTypeId();
//            String shortCountStr = dealParamService.getValue(userId, coinTypeId, UserParamConst.SHORT_COUNT);
//            Integer shortCount = Integer.valueOf(shortCountStr);
//            String deadLineStr = dealParamService.getValue(userId, coinTypeId, UserParamConst.SHORT_DEADLINE);
//            String shortStartTimeStr = jedisUtil.get(RedisKeyCreator.shortStartTime(userId));
//            if (!StringUtils.hasText(shortStartTimeStr) || shortStartTimeStr.equals("0"))
//                continue;
//            LocalDateTime deadLine = LocalDateTime.parse(shortStartTimeStr).plusHours(Long.valueOf(deadLineStr));
//            if (LocalDateTime.now().isBefore(deadLine)) {
//                shortCount--;
//                dealParamService.update(userId, coinTypeId, dealParamKeyService.getKeyByParamName(UserParamConst.SHORT_COUNT), String.valueOf(shortCount));
//                jedisUtil.set(RedisKeyCreator.shortStartTime(userId), LocalDateTime.now().toString());
//            }
//        }
//        //jedisUtil.close();
//    }
//
//    /**
//     * 刷新用户能否发布挂买挂卖单状态
//     **/
////    @Scheduled(cron = "0 0 0 * * ?")
//    @Scheduled(fixedRate = 5 * 60 * 1000)
//    public void checkUserPublishable() {
//        List<User> userList = userService.getAll();
//        for (User user : userList) {
//            if (!userService.hasRole(user.getId(), UserType.MEMBER))
//                continue;
//            else {
//                BaseDto myOnlineDeal = dealController.getMyOnlineDeal(user.getId(), DealType.HANG_BUY);
//                if (myOnlineDeal != null && !myOnlineDeal.isError()) {
//                    if (myOnlineDeal.getData() != null) {
//                        /** 有在线挂买单 **/
//                        //Jedis //jedis = jedisUtil.getJedis();
//                        jedisUtil.set(RedisKeyCreator.ablePublishHangBuy(user.getId()), "1");
//                        //jedisUtil.close();
//                    } else {
//                        /** 没有在线挂买单 **/
//                        //Jedis //jedis = jedisUtil.getJedis();
//                        jedisUtil.del(RedisKeyCreator.ablePublishHangBuy(user.getId()));
//                        //jedisUtil.close();
//                    }
//                }
//
//                myOnlineDeal = dealController.getMyOnlineDeal(user.getId(), DealType.HANG_SALE);
//                if (myOnlineDeal != null && !myOnlineDeal.isError()) {
//                    if (myOnlineDeal.getData() != null) {
//                        /** 有在线挂卖单 **/
//                        //Jedis //jedis = jedisUtil.getJedis();
//                        jedisUtil.set(RedisKeyCreator.ablePublishHangSale(user.getId()), "1");
//                        //jedisUtil.close();
//                    } else {
//                        /** 没有在线挂卖单 **/
//                        //Jedis //jedis = jedisUtil.getJedis();
//                        jedisUtil.del(RedisKeyCreator.ablePublishHangSale(user.getId()));
//                        //jedisUtil.close();
//                    }
//                }
//            }
//        }
//    }
//
//    /**
//     * 实名认证
//     **/
//    @Scheduled(fixedRate = 15 * 60000)
//    public void trueInfoVerify() {
//        List<UserRealInfo> userRealInfoList = userRealInfoService.getAllNeedVerify();
//        if (userRealInfoList != null) {
//            for (UserRealInfo userRealInfo : userRealInfoList) {
//                /** 验证正面照 **/
//                String idCardFrontPhoto = userRealInfo.getIdCardFrontPhoto();
//                if (!StringUtils.hasText(idCardFrontPhoto))
//                    continue;
//                BaseDto baseDto = userRealInfoService.verifyIdCardPhoto(idCardFrontPhoto, true, userRealInfo);
//                if (baseDto.getCode() == CodeConst.ERROR) {
////                ossCommonService.deleteFile(bucketName,idCardFrontPhoto);
//                    userRealInfo.setVerified(2);
//                    userRealInfoService.update(userRealInfo);
//                    continue;
//                }
//
//                /** 验证背面照 **/
//                String idCardBackPhoto = userRealInfo.getIdCardBackPhoto();
//                if (!StringUtils.hasText(idCardBackPhoto)) {
//                    userRealInfo.setVerified(2);
//                    userRealInfoService.update(userRealInfo);
//                    continue;
//                }
//                baseDto = userRealInfoService.verifyIdCardPhoto(idCardBackPhoto, false, userRealInfo);
//                if (baseDto != null && baseDto.getCode() == CodeConst.ERROR) {
////                ossCommonService.deleteFile(bucketName,idCardBackPhoto);
//                    userRealInfo.setVerified(2);
//                    userRealInfoService.update(userRealInfo);
//                    continue;
//                }
//
//                if (baseDto == null || !baseDto.isError()) {
//                    userRealInfo.setVerified(1);
//                    userRealInfoService.update(userRealInfo);
//                }
//            }
//        }
//    }
//
//
//    /**
//     * 广告上下架定时任务
//     */
//    @Scheduled(fixedRate = 60000)
//    public void dealBanner() {
//        List<ContentAd> contentAdList = contentAdService.getAllWithoutComplete();
//        if (contentAdList == null || contentAdList.isEmpty())
//            return;
//        for (ContentAd contentAd : contentAdList) {
//            Integer adStateType = contentAd.getAdStateType();
//            if (adStateType == ContentAdStateType.LAUNCH_DELAYED) {
//                LocalDateTime startTime = contentAd.getStartTime();
//                LocalDateTime endTime = contentAd.getEndTime();
//                if (LocalDateTime.now().isAfter(startTime) && LocalDateTime.now().isBefore(endTime)) {
//                    contentAd.setAdState(1);
//                    contentAdService.update(contentAd);
//                } else {
//                    if (contentAd.getAdStateType() == 1) {
//                        contentAd.setAdState(0);
//                        contentAdService.update(contentAd);
//                    }
//                }
//            }
//        }
//    }
//
//
//    /**
//     * 交易自动匹配
//     **/
//    @Scheduled(fixedRate = 5000 * 2)
//    public void dealMatch() {
//        dealMatchService.match();
//    }
//
//    /**
//     * 每天0:00:00 执行货币单价涨幅
//     **/
//    @Scheduled(cron = "59 59 23 * * ?")
//    public void openPriceIncrease() {
//        coinTypeService.increase();
//        System.out.println();
//    }
//
//    @Override
//    public void afterPropertiesSet() throws Exception {
////        init();
//    }
//
//
//    @Scheduled(fixedRate = 60000 * 2)
//    public void caculateKLineDataOneMinute() {
//        kLineDataService.calculateKLineDataByMinuteUnit(1);
//    }
//
//    @Scheduled(fixedRate = 60000 * 10)
//    public void caculateKLineDataFiveMinute() {
//        kLineDataService.calculateKLineDataByMinuteUnit(5);
//    }
//
//    @Scheduled(fixedRate = 60000 * 15)
//    public void caculateKLineDataFifteen() {
//        kLineDataService.calculateKLineDataByMinuteUnit(15);
//    }
//
//    @Scheduled(fixedRate = 60000 * 30)
//    public void caculateKLineDataThirty() {
//        kLineDataService.calculateKLineDataByMinuteUnit(30);
//    }
//
//    @Scheduled(fixedRate = 60000 * 60)
//    public void caculateKLineDataHourOne() {
//        kLineDataService.calculateKLineDataByMinuteUnit(60);
//    }
//
//    @Scheduled(fixedRate = 60000 * 120)
//    public void caculateKLineDataHourTwo() {
//        kLineDataService.calculateKLineDataByMinuteUnit(120);
//    }
//
//    @Scheduled(fixedRate = 60000 * 240)
//    public void caculateKLineDataHourFour() {
//        kLineDataService.calculateKLineDataByMinuteUnit(240);
//    }
//
//    @Scheduled(fixedRate = 60000 * 480)
//    public void caculateKLineDataHourEight() {
//        kLineDataService.calculateKLineDataByMinuteUnit(480);
//    }
//
////    @Scheduled(fixedRate = 60000 * 1440)
//    @Scheduled(cron = "0 0 2 1 * ? ")
////    @Scheduled(cron = "0 0 0 * * ?")
//    public void caculateKLineDataDayOne() {
//        kLineDataService.calculateKLineDataByMinuteUnit(1440);
//    }
//
//    //    0 0 2 1 * ? *
//    @Scheduled(cron = "0 0 2 1 * ? ")
////@Scheduled(fixedRate = 60000 * 10080)
//    public void caculateKLineDataDaySeven() {
//        kLineDataService.calculateKLineDataByMinuteUnit(10080);
//    }
//
////    @Scheduled(fixedRate = 60000 * 43200)
//    @Scheduled(cron = "0 0 2 1 * ? ")
//    public void caculateKLineDataMonthOne() {
//        kLineDataService.calculateKLineDataByMinuteUnit(43200);
//    }
//}